<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <button id="click">按我呀</button>
    <div id="response">

    </div>
    <script src="/static/js/jquery-1.11.0.js"></script>
    <script>
        $("#click").click(
            function () {
                $.ajax(
                    {
                        url:"/ajax_get_data/",
                        type:"get",
                        data:"",
                        success:function (data) {
                            var list1 = data["list1"];
                            for(var i in list1){
                                var food = list1[i]["name"];
                                var html = "<p>"+food+"</p>";
                                $("#response").append(html);
                            }
                        },
                        error:function (error) {
                            console.log(error)
                        }
                    }
                )
            }
        )
    </script>
</body>
</html>